Skip to content

Conversation

@GeoffreyBooth
Copy link
Member

This includes work by @LiviaMedeiros in #49531, #49629, and #49540.

Following up from #49869, this PR allows extensionless ESM JavaScript and Wasm files within "type": "module" package scopes to run as entry points or be imported. This can be done as a semver-minor change because currently such files error when they are within a module scope. (Outside of such a scope, they are interpreted as CommonJS modules unless --experimental-default-type=module is passed.)

This was discussed in the most recent TSC meeting, nodejs/TSC#1442. At that meeting it was agreed that this change could go out in 21.0.0, but not immediately in 20.x or below. It doesn’t need to be restricted from 20.x indefinitely, but there was a request to hold off on backporting it to 20.x until it had been public in 21.x for a bit. I’ve added labels accordingly.

@nodejs/loaders @nodejs/wasi

@GeoffreyBooth GeoffreyBooth added esm Issues and PRs related to the ECMAScript Modules implementation. wasm Issues and PRs related to WebAssembly. dont-land-on-v18.x dont-land-on-v20.x PRs that should not land on the v20.x-staging branch and should not be released in v20.x. labels Sep 30, 2023
@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/loaders

@nodejs-github-bot nodejs-github-bot added errors Issues and PRs related to JavaScript errors originated in Node.js core. needs-ci PRs that need a full CI run. labels Sep 30, 2023
@LiviaMedeiros LiviaMedeiros added the request-ci Add this label to start a Jenkins CI on a PR. label Sep 30, 2023
Copy link
Member

@LiviaMedeiros LiviaMedeiros left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RSLGTM

@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Sep 30, 2023
@nodejs-github-bot
Copy link
Collaborator

@shrujalshah28
Copy link
Contributor

Maybe add baking-for-lts PRs that need to wait before landing in a LTS release. ?

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@GeoffreyBooth GeoffreyBooth added baking-for-lts PRs that need to wait before landing in a LTS release. and removed dont-land-on-v18.x dont-land-on-v20.x PRs that should not land on the v20.x-staging branch and should not be released in v20.x. labels Sep 30, 2023
@GeoffreyBooth
Copy link
Member Author

Maybe add baking-for-lts PRs that need to wait before landing in a LTS release. ?

That’s a good idea, I assume I should use that without the dont-land ones?

@GeoffreyBooth
Copy link
Member Author

@LiviaMedeiros or someone else, do you want to approve this? Then it can land.

Copy link
Contributor

@guybedford guybedford left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The lookup logic all looks correct to me.

@LiviaMedeiros LiviaMedeiros self-assigned this Oct 3, 2023
@LiviaMedeiros
Copy link
Member

Landed in 9c68320

@GeoffreyBooth GeoffreyBooth deleted the extensionless-in-module-scope branch October 3, 2023 05:08
@targos targos added backported-to-v18.x and removed baking-for-lts PRs that need to wait before landing in a LTS release. labels Nov 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no pending requests for changes, and a CI started. errors Issues and PRs related to JavaScript errors originated in Node.js core. esm Issues and PRs related to the ECMAScript Modules implementation. needs-ci PRs that need a full CI run. wasm Issues and PRs related to WebAssembly.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants